var reader = new FileReader();
reader.onload = function(event) {
	// XCommand validieren und speichern
}
reader.readAsText(file);
